import request from '@/utils/request'

// 获取角色列表
export function roleList(data) {
	return request({
		url: '/sys/role',
		method: 'get',
		params: data
	})
}
// 查找角色
export function getRole(data) {
	return request({
		url: '/sys/role/' + data.id,
		method: 'get',
	})
}
// 增加角色
export function addRole(data) {
	return request({
		url: '/sys/role',
		method: 'post',
		data
	})
}
// 编辑角色
export function updateRole(data) {
	return request({
		url: '/sys/role',
		method: 'put',
		data
	})
}
//删除角色
export function deleteRole(data) {
	return request({
		url: '/sys/role/' + data.id,
		method: 'delete',
	})
}

//批量删除角色
export function deleteRoles(data) {
	return request({
		url: '/sys/role/' + data.ids,
		method: 'delete',
	})
}